<template>
    <div class="new-chat-example">
        <!-- NewChat 组件 -->
        <NewChat :objm="objManager" ref="newChatRef" />
    </div>
</template>

<script setup lang="ts">
import { ESObjectsManager } from 'earthsdk3';
import { useTemplateRef } from 'vue';
import { NewChat } from '../../packages';

const objManager = new ESObjectsManager();

const newChatRef = useTemplateRef('newChatRef');

objManager.sceneTree.createSceneObjectTreeItemFromJson({
    "id": "45900bf3-dcae-4a18-a29f-11930bf86c20",
    "type": "ESImageryLayer",
    "name": "全球影像",
    "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
    "maximumLevel": 18
})

</script>

<style scoped>
.new-chat-example {
    width: 600px;
    height: 800px;
    display: flex;
    flex-direction: column;
    background-color: #f0f2f5;
}
</style>
